package com.sqfw.project.knowledge.service.impl;

import java.util.List;

import com.sqfw.project.knowledge.domain.KnowledgeSort;
import com.sqfw.project.knowledge.mapper.KnowledgeSortMapper;
import com.sqfw.project.knowledge.service.IKnowledgeSortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 知识分类Service业务层处理
 * 
 * @author tangxt
 * @date 2023-06-19
 */
@Service
public class KnowledgeSortServiceImpl implements IKnowledgeSortService {
    @Autowired
    private KnowledgeSortMapper knowledgeSortMapper;

    /**
     * 查询知识分类
     * 
     * @param autoid 知识分类主键
     * @return 知识分类
     */
    @Override
    public KnowledgeSort selectKnowledgeSortByAutoid(String autoid)
    {
        return knowledgeSortMapper.selectKnowledgeSortByAutoid(autoid);
    }

    /**
     * 查询知识分类列表
     * 
     * @param knowledgeSort 知识分类
     * @return 知识分类
     */
    @Override
    public List<KnowledgeSort> selectKnowledgeSortList(KnowledgeSort knowledgeSort)
    {
        return knowledgeSortMapper.selectKnowledgeSortList(knowledgeSort);
    }

    /**
     * 新增知识分类
     * 
     * @param knowledgeSort 知识分类
     * @return 结果
     */
    @Override
    public int insertKnowledgeSort(KnowledgeSort knowledgeSort)
    {
        return knowledgeSortMapper.insertKnowledgeSort(knowledgeSort);
    }

    /**
     * 修改知识分类
     * 
     * @param knowledgeSort 知识分类
     * @return 结果
     */
    @Override
    public int updateKnowledgeSort(KnowledgeSort knowledgeSort)
    {
        return knowledgeSortMapper.updateKnowledgeSort(knowledgeSort);
    }

    /**
     * 批量删除知识分类
     * 
     * @param autoids 需要删除的知识分类主键
     * @return 结果
     */
    @Override
    public int deleteKnowledgeSortByAutoids(String[] autoids)
    {
        return knowledgeSortMapper.deleteKnowledgeSortByAutoids(autoids);
    }

    /**
     * 删除知识分类信息
     * 
     * @param autoid 知识分类主键
     * @return 结果
     */
    @Override
    public int deleteKnowledgeSortByAutoid(String autoid)
    {
        return knowledgeSortMapper.deleteKnowledgeSortByAutoid(autoid);
    }
}
